package cn.edu.sptc.liaoyu.hellospring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {
    @GetMapping("/Hello")
    @ResponseBody
    public String helloWorld(@RequestParam( value ="姓名",required = true,defaultValue = "张三") String name) {
        return "Hello world"+name+"!";

    }
}
